package com.boomsecret.juc.collections;

import java.util.concurrent.ConcurrentSkipListSet;

/**
 * @author wangjinliang on 2019/1/22.
 */
public class ConcurrentSkipListSetDemo {
    private static ConcurrentSkipListSet<String> concurrentSkipListSet = new ConcurrentSkipListSet<>();

    public static void main(String[] args) {
        concurrentSkipListSet.add("dd");
        concurrentSkipListSet.add("bb");
        concurrentSkipListSet.add("aa");
        concurrentSkipListSet.add("cc");
        print(concurrentSkipListSet);
    }

    private static void print(ConcurrentSkipListSet<String> concurrentSkipListSet) {
        for (String value : concurrentSkipListSet) {
            System.out.println(value);
        }
    }
}
